The statements in this section merely provide background information related to the present disclosure and do not constitute prior art.
Standardization of a new standard corresponding to High Efficiency Video Coding (HEVC) which is more excellent and outstanding above existing H.264/Advanced Video Coding (AVC) is being progressed by a joint team of Moving Picture Experts Group (MPEG) and Video Coding Experts Group (VCEG) which is called Joint Collaborative Team on Video Coding (JCT-VC).
HEVC uses a Coding Tree Block (CTB) as a basic encoding unit, and the CTB is defined by square shapes in different sizes. The CTB is commonly composed of a Coding Units (CUs). In HEVC, a basic unit of the prediction is defined as a Prediction Unit (PU), and one CU is divided into a plurality of blocks and then used for the prediction.
FIG. 2 is a diagram of typical PU types and a sequence of coding the PUs in a single CU.
Referring to FIG. 2, a skip mode is performed in the single CU having a size of 2N×2N followed by sequential predictions in an inter 2N×2N mode, inter 2N×N mode, inter N×2N mode, inter N×N mode, intra 2N×2N mode and then intra N×N mode. However, in all CUs except for the CU of size 8×8 (2N×2N), the encoding is performed in all PUs except for the inter N×N mode and the intra N×N mode. So the predictions in the inter N×N mode and the intra N×N mode are performed only for the CU of size 8×8.
A prediction method is largely classified into an intra predictive coding which performs the prediction by using a predicted value from an encoded block within a frame which is being encoded and an inter predictive coding which predicts a block of a current frame by estimating a motion from a previously reconstructed frame.
The intra prediction method includes a unified intra prediction method which performs the prediction in various directions by using previously encoded pixel values located in a left side, a lower left side, an upper left side, an upper side, or an upper right side of a current block to be encoded.
FIG. 3 is a diagram of typical directions of intra prediction modes.
Referring to FIG. 3, the intra prediction modes comprises a total of thirty five prediction modes including a DC (direct current) mode, a planar mode and angular modes having a total of thirty three prediction directions.
The inter predictive coding of the video uses a motion compensation which predicts a current block by partitioning an image frame and estimating a motion from a previously encoded frame.
When one predicted block is generated through the intra predictive coding or the inter predictive coding, a residual signal is generated by calculating a difference between original pixel values of the current block and predicted pixel values of the predicted block. Then, the residual signal is transformed to generate a frequency transform block which is then quantized to generate a frequency coefficient block.
As fore-mentioned in FIG. 2, a general video encoding apparatus calculates optimal units from various candidate PUs according to a Rate-Distortion (RD) cost optimization scheme, and then transmits information on a result generated by performing the encoding in the corresponding units to a video decoding apparatus.
The inventor(s) has experienced that a method of calculating RD costs for all PUs in a single CU is efficient as long as the last-place intra N×N mode in the prediction sequence is determined to be the optimal mode, but is inefficient in time when the first-place inter 2N×2N mode in the prediction sequence is determined as the optimal mode.